exports.install = function (Vue, options) {
  // 表格头部样式, index 代表几级表头
  Vue.prototype.headFirst = function ({
    row,
    colunm,
    rowIndex,
    columnIndex
  }, index = 1) {
    let colorObj = {
      background: '#45c2b5',
      color: '#fff',
      fontSize: '12px',
      height: '0px',
      padding: '3px 0',
    };
    if (index == 1) {
      if (rowIndex === 0) {
        return colorObj;
      } else {
        return "";
      }
    } else if (index == 2) {
      if (rowIndex === 0 || rowIndex === 1) {
        return colorObj;
      } else {
        return "";
      }
    } else if (index == 3) {
      if (rowIndex === 0 || rowIndex === 1 || rowIndex === 2) {
        return colorObj;
      } else {
        return "";
      }
    }
  };
  // // 合计行样式
  Vue.prototype.headFirst_col = function headFirst_col({
    row,
    column,
    rowIndex,
    columnIndex
  }, arr = [], special = 0) {
    // special 特殊 1 是每日消费汇总特殊处理s
    if (rowIndex === arr.length - 1) {
      if (special) {
        if (columnIndex === 0) {
          return {
            opacity: '0',
            'font-size': '14px',
            height: '0px',
            padding: '1px',
            background: "#ddd ",
          };
        } else {
          // 指定列号
          return {
            'font-size': '14px',
            height: '0px',
            padding: '1px',
            background: "#ddd ",
          };
        }
      }
      return {
        'font-size': '14px',
        height: '0px',
        padding: '1px',
        background: "#ddd ",
      };

    }
    if (rowIndex % 2 == 0) {
      return {
        'font-size': '14px',
        height: '0px',
        padding: '1px',
        // background: '#eee'
      }
    } else {
    // special 特殊 2 是参数模板的表格处理,以及放了控件的表格
      if(special == 2){
        return {
          'font-size': '14px',
          height: '0px',
          padding: '2px',
        }
      }else{
        return {
          'font-size': '14px',
          height: '0px',
          padding: '1px',
          background: '#efefef'
        }
      }
     
    }
  }
}
// { background: '#45c2b5', color: '#fff' , fontSize:'12px', height:'30px' }
